<?php
class tx_workspace_FlexForm {
 function getWorkSpace ($config) {
 global $BE_USER;
	$optionList[] = array(0 => 'Live', 1 => 0);
	$where = 'deleted=0 AND adminusers='.$BE_USER->user['uid'];
	$res =  $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title','sys_workspace',$where);
	
	while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))
	{
		$optionList[] = array(0 => $row['title'], 1 => $row['uid']);
	}
   $config['items'] = array_merge($config['items'],$optionList);
   
   return $config;
 }
}

?>